<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initSite()
	{
		date_default_timezone_set('UTC');
		$this->bootstrap('view');
		$config = new Zend_Config_Xml(MODULES_PATH. '/../private/sites/default.xml');
		
		$view = $this->getResource('view');
		$view->assign('SITE_NAME', $config->site->name)
			->assign('BASE_URL', $config->site->url->base)
			->assign('PUBLIC_URL', $config->site->url->public)
			->assign('STATIC_URL', $config->site->url->static)
			->assign('UPLOAD_URL', $config->site->url->upload);
	}

	protected function _initPlugin()
	{
        $this->bootstrap('frontController');
        // Get frontController resource
        $this->getResource('frontController')
			#->registerPlugin(new Base_Controller_Plugin_UrlRoute(), 10)
			->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
                'module' => 'mnt',
                'controller' => 'error',
                'action' => 'error'
			)), 100);
	}
}